package com.hoshiibuy.spu.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Transient;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author yangcheng
 * @create 2019-04-26
 */
@ApiModel
@Data
public class BaseEntity implements Serializable {

    @ApiModelProperty(name = "id", value = "ID", dataType = "java.lang.Long", hidden = true)
    private Long id;

    /**
     * 创建时间
     */
    @ApiModelProperty(name = "createdtime", value = "创建时间", required = true, dataType = "java.util.Date", hidden = true)
    private LocalDateTime createdtime;

    /**
     * 修改时间
     */
    @ApiModelProperty(name = "updatedtime", value = "修改时间", required = true, dataType = "java.util.Date", hidden = true)
    private LocalDateTime updatedtime;

    /**
     * 建立人
     */
    @ApiModelProperty(name = "createdby", value = "建立人", required = true, dataType = "java.lang.String", hidden = true)
    private String createdby;

    /**
     * 修改人
     */
    @ApiModelProperty(name = "updatedby", value = "修改人", required = true, dataType = "java.lang.String", hidden = true)
    private String updatedby;

    /**
     *当前页
     */
    @ApiModelProperty(name = "pageIndex", value = "当前页码", dataType = "java.lang.Long", hidden = true)
    @TableField(exist = false)
    private Long pageIndex = 1L;

    /**
     *每页数量从1开始
     */
    @ApiModelProperty(name = "pageSize", value = "每页大小", dataType = "java.lang.Long", hidden = true)
    @TableField(exist = false)
    private Long pageSize = 10L;

}
